package com.karrim.client.util.file;

/**
 *
 * @author andrea.cantafio
 */
public class FileApi {
    
    public static boolean isFullySupported () {
        return verifyAll();
    }

    public static boolean isObjectSupported(String name) {
        return verify(name);
    }
    
    private static native boolean verify (String name)/*-{
        return eval('return $wnd.' + name);
    }-*/;
    
    private static native boolean verifyAll ()/*-{
        return $wnd.File && $wnd.FileReader && $wnd.FileList && $wnd.Blob
    }-*/;
    
}
